<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" href="/css/jquery-ui.min.css">
		<link rel="stylesheet" href="/css/bootstrap.min.css">
		<link rel="stylesheet" href="/css/amazeui.css" />

		<link rel="stylesheet" href="/css/activity.css" />

	</head>

	<body class="am-with-topbar-fixed-top">
		<div class="am-u-sm-12">
			<div class="card-box">
						<h4 class="header-title m-t-0 m-b-30">基本示例</h4>
						<form class="am-form"  id="ajaxform" action="/do_registration/#(formConfigs[0].formId)">
							#for(formConfig: formConfigs)
								#if(formConfig.widgetType == 1)
							    <div class="am-form-group">
							      <label for="doc-ipt-email-2">#(formConfig.fieldName)</label>
							      <input type="text" class="am-radius" name="input"  >
							    </div>
						    	#end
						    	
						    	#if(formConfig.widgetType == 2)
							    <div class="am-form-group">
							      <label for="doc-ipt-email-2">#(formConfig.fieldName)</label>
							      <textarea  class="am-radius" name="input"></textarea>
							    </div>
						    	#end
						    	
						    	#if(formConfig.widgetType == 3)
<!-- 							    <div class="am-form-group"> -->
<!-- 							      <label for="doc-ipt-email-2">#(formConfig.fieldName)</label> -->
<!-- 							      <input type="radio" class="am-radius" name="input" > -->
<!-- 							    </div> -->
						    	#end
						    	
						    	#if(formConfig.widgetType == 4)
<!-- 							    <div class="am-form-group"> -->
<!-- 							      <label for="doc-ipt-email-2">#(formConfig.fieldName)</label> -->
<!-- 							      <input type="checkbox" class="am-radius" name="input" > -->
<!-- 							    </div> -->
						    	#end
						    	
						    	#if(formConfig.widgetType == 5)
<!-- 							    <div class="am-form-group"> -->
<!-- 							      <label for="doc-ipt-email-2">#(formConfig.fieldName)</label> -->
<!-- 							      <input type="email" class="am-radius" name="input" > -->
<!-- 							    </div> -->
						    	#end
							#end
						
						    <div class="am-checkbox">
						      <label>
						        <input type="checkbox"> 记住我
						      </label>
						    </div>
						
						    <button type="button" onclick="submits()" class="am-btn am-btn-primary">Submit</button>
						</form>
					</div>
		</div>

	</body>
	<script src="/js/jquery.min.js"></script>
	<script src="/js/jquery-ui.min.js"></script>
	<script src="/js/bootstrap.min.js"></script>
	<script>
	
	function submits() {
		console.log("ssssssssssssssssssssss");
			var url = $("#ajaxform").attr("action");
		
			
		$.ajax({
			type : "get",
			url : url,
			data:$("#ajaxform").serialize(),
			dataType : 'json',
			success : function(data) {
				alert("报名成功");
				window.location = "/";
			}
		});
	}
	
	</script>

</html>